
<form class="layui-form pt10" action="{:url()}" method="post" id="editForm">
  
    <div class="layui-form-item">
        <label class="layui-form-label">会员</label>
        <div class="layui-input-inline">
            <select name="user_id" class="layui-input field-user_id" {if isset($formData.user_id)} disabled {/if}  lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$users|raw}
            </select>
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">顾问</label>
        <div class="layui-input-inline">
            <select name="adviser_id" class="layui-input field-adviser_id" lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$advisers|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">美容师</label>
        <div class="layui-input-inline">
            <div id="technician_id" style="width: 100%; "></div>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">疗程/产品卡</label>
        <div class="layui-input-inline">
            <select name="course_id" class="layui-input field-course_id" {if isset($formData.course_id)} disabled {/if} lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$courses|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">售价</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-price1" name="price1" {if isset($formData.price1)} disabled {/if} value="0.00" lay-verify="number" autocomplete="off" ">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">收款账户</label>
        <div class="layui-input-inline">
            <select name="account_id" class="layui-input field-account_id" {if isset($formData.account_id)} disabled {/if} lay-verify="required" lay-search="">
              <option value="">直接选择或搜索选择</option>
              {$accounts|raw}
            </select>
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-bak" name="bak"  lay-verify="" autocomplete="off" ">
        </div>
    </div>
    {if isset($formData['id']) && $admin_type == '财务'}
    <div class="layui-form-item">
        <label class="layui-form-label">审核</label>
        <div class="layui-input-inline">
            <input type="radio" class="field-status" name="status" value="2" title="通过" checked>
            <input type="radio" class="field-status" name="status" value="3" title="不通过">
        </div>
        <div class="layui-form-mid layui-word-aux"></div>
        <input type="hidden" class="field-finance_id" name="finance_id" value="{:ADMIN_ID}">
    </div>
    {else}
    <input type="hidden" class="field-cashier_id" name="cashier_id" value="{:ADMIN_ID}">
    <input type="hidden" class="field-sn" name="sn" value="{:create_order_sn()}">
    <input type="hidden" class="field-shop_id" name="shop_id" value="{:session('shop_id')}">
    {/if}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" class="field-id" name="id">
        </div>
    </div>
    <div class="pop-bottom-bar hisi-footer">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: true}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>
<!-- <script src="__PUBLIC_JS__/layui/xm-select.js" charset="utf-8"></script> -->
{include file="system@block/layui" /}

<script>

layui.use(['func','laydate','xmSelect'], function() {
    //常规用法
    var laydate = layui.laydate;
    var xmSelect = layui.xmSelect;
    laydate.render({
          elem: '#date',
          trigger:'click',
          type:'datetime'
        });
var technician_id = xmSelect.render({
        el: '#technician_id', 
        autoRow: true,
        name:'technician_id',
        data: {:json_encode($technicians,true)},
    })
    technician_id.setValue({:isset($formData.technician_id) ? json_encode($formData.technician_id,true) : ''})

    layui.func.assign({:json_encode($formData)});


});
</script>
